1. Field of the Invention
The present invention relates to the area of data storage and data reading, and more particularly to method and apparatus for storing and reading data on/from a hard disk.
2. Description of Related Art
Currently, the popular file systems are FAT12, FAT16, FAT32, NTFS, EXT2, EXT3, etc. These file systems are all composed of a file directory indexed list and a cluster list. A file in these file system may occupy a lot of discontinuous clusters. When the hard disk is required to be read and written, a magnetic head provided in a hard disk will jump and reposition according to the discontinuous clusters of the file. As shown in FIG. 1, it is a flow diagram for reading a file in a hard disk that adapts the conventional file system. It includes operations as follows: obtaining a file directory indexed list; reading out a first cluster assigned to an objected file from the file directory indexed list; reading out a content from the cluster assigned to the file; determining if the file is completely read out; if so, ending the operation; if not, obtaining a next cluster assigned to the file and repeating the corresponding operations mentioned above. Due to discontinuous clusters of the file, the magnetic head provided on the hard disk will frequently jump and reposition to a cluster a few clusters away. This jumping and reposition process is the major reason for the hard disk depreciation. For writing disk fragmentation and making the hard disk involve in more repositioning operations.
In some applications which require to process a large amount of data, such as monitoring industry which needs to store the video data on the hard disk every day, so a large quantity of writing operations are needed on the hard disk. In this special application, if adopting conventional file system to manage and store the data on the hard disk, the service life of the hard disk may be significantly affected and the cost for the operation increases.
Thus there is a need for techniques for storing and reading data on/from hard disk with minimum affect on the service life thereof.